package com.sairobo.admin.modules.wechat.controller;

import com.sairobo.admin.modules.wechat.service.WeChatService;
import com.sairobo.base.modules.sys.controller.AbstractController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 微信扫描登录接口
 *
 * @author admin
 * @email sairobo
 * @url www.sairobo.com
 * @date 2018年1月11日 上午11:05:49
 */
@RestController
@RequestMapping("/wechat/")
@Api("微信")
public class WeChatController extends AbstractController {
	
	@Autowired
	private WeChatService weChatService;
	
	/**
	 * 用户确认登录后回调方法
	 * @return
	 */
    @ApiOperation("微信用户扫码确认登录后回调方法")
	@RequestMapping("/callBack")
	public void callBack(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {
        weChatService.callBack(req,resp);
	}

}
